from django.urls import path

from . import views

app_name = 'users'

urlpatterns = [
    # 登录
    path('login/', views.login_view, name='login'),
    # 注册
    path('register/', views.register_view, name='register'),
    # 注销
    path('logout/', views.logout_view, name='logout'),
    # 用户协议
    path('protocal/', views.protocal_view, name='protocal'),
    # 密码找回用户名输入
    path('retrieve/username/', views.retrieve_password_username_view, name='retrieve-username'),
    # 密码找回密保输入
    path('<int:user_id>/retrieve/encrypted/', views.retrieve_password_security_question_view, name='retrieve-encrypted'),
    # 密码找回重置密码
    path('<int:user_id>/retrieve/password/', views.retrieve_password_password_view, name='retrieve-password'),
    # 用户基本信息界面
    path('<int:user_id>/base_information/', views.user_base_information_view, name='base-information'),
    # 用户名修改界面
    path('<int:user_id>/username/', views.user_username_view, name='username'),
    # 头像修改页面
    path('<int:user_id>/head_portrait/', views.user_head_portrait_view, name='head-portrait'),
    # 账户安全页面
    path('<int:user_id>/safety/', views.user_safety_view, name='safety'),
    # 密保设置页面
    path('<int:user_id>/safety/security_question/', views.user_safety_security_question_view, name='safety-security-question'),
    # 邮箱修改页面
    path('<int:user_id>/safety/email/', views.user_safety_email_view, name='safety-email'),
    # 用户个人空间
    path('<int:user_id>/space/', views.user_space_view, name='space'),
    # 用户文章列表页
    path('<int:user_id>/space/post_list/', views.user_space_post_list_view, name='space-post-list'),
    # 用户留言列表页
    path('<int:user_id>/space/comment_list/', views.user_space_comment_list_view, name='space-comment-list'),
    # 管理界面
    path('<int:user_id>/management/', views.user_management_view, name="management"),
    # 部门管理界面
    path('<int:user_id>/management/department/', views.user_management_department_view, name="management-department"),
    # 社团管理界面
    path('<int:user_id>/management/community/', views.user_management_community_view, name="management-community"),
    # 留言管理界面
    path('<int:user_id>/management/comment/', views.user_management_comment_view, name="management-comment")
]
